package com.ruoyi.web.controller.discuss;

import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.ObjectUtil;
import com.ruoyi.discuss.service.IDiscussService;
import com.ruoyi.discuss.vo.DiscussVO;
import com.ruoyi.exam.serive.IScoresService;
import com.ruoyi.exam.vo.*;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/discuss")
public class DiscussController extends BaseController {

    @Autowired
    private IDiscussService discussService;



    //评论列表
    @GetMapping("/list")
    @PreAuthorize("@ss.hasPermi('discuss:list')")
    public TableDataInfo discussList(DiscussVO discussVO){
        startPage();
        List<DiscussVO> list = discussService.listDiscuss(discussVO);
        return getDataTable(list);
    }


}
